#!/bin/sh
v=${1:-'2'}

basepath=/export/guojiangtao/dataset
echo "basepath路径: ${basepath}"

dataset=CCIRCup
echo "数据集: ${dataset}"

trainfile=CCIRCup.train.bmes
devfile=CCIRCup.dev.bmes
testfile=CCIRCup.test.bmes
echo "训练数据文件: ${trainfile},验证数据文件: ${devfile},测试数据文件: ${testfile}"

curPath=$(readlink -f "$(dirname "$0")")
echo $curPath

Param="--status train --train ${basepath}/${dataset}/${trainfile} --dev ${basepath}/${dataset}/${devfile} --test ${basepath}/${dataset}/${testfile} "
Param2="--saved_model ${curPath}/saved_model/${dataset} --saved_set ${curPath}/savedset/${dataset} --batch_size 4 --num_epoch ${v}"
echo $Param$Param2
echo "进行${dataset}数据集训练..."
python main.py $Param$Param2
echo 训练结束

Param="--status test --test ${basepath}/${dataset}/${testfile} --saved_model ${curPath}/saved_model/${dataset} --saved_set ${curPath}/savedset/${dataset} "
echo $Param
echo "进行${dataset}数据集测试..."
python main.py $Param
Param="--status decode --raw ${basepath}/${dataset}/${testfile} --output ${dataset}decode.txt --saved_model ${curPath}/saved_model/${dataset} --saved_set ${curPath}/savedset/${dataset} "
echo $Param
echo "进行${dataset}数据集解码..."
python main.py $Param
echo 运行结束

